#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=40;
typedef long long LL;
const LL mod=1e9+7;

int main(void){
    LL n;cin>>n;
    if(n==1||n==2||n==5||n==6||n==9||n==10||n==13||n==14||n==17||n==18) cout<<"0"<<endl;
    if(n==3||n==4) cout<<2<<endl;
    if(n==7) cout<<52<<endl;
    if(n==8) cout<<300<<endl;
    if(n==11) cout<<35584%mod<<endl;
    if(n==12) cout<<216288%mod<<endl;
    if(n==15) cout<<79619280%mod<<endl;
    if(n==16) cout<<653443600%mod<<endl;
}
